package com.tanhua.model.vo;

import com.tanhua.model.dto.ExamDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 测试试卷 封装VO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ExamVO implements Serializable {

    private String id;
    private String name;
    private String cover;
    private String level;
    private Integer star;
    private List<QuestionsVO> questions;
    private Integer isLock;
    private String reportId	;

    public static ExamVO setExamVOData(ExamDTO dto){
        ExamVO vo = new ExamVO();
        vo.setId(dto.getId().toString());
        vo.setName(dto.getName());
        vo.setCover(dto.getCover());
        vo.setLevel(dto.getLevel());
        vo.setStar(dto.getStar());
        vo.setReportId(dto.getReportId()==null?null:dto.getReportId().toString());
        return vo;
    }

}
